class C:
    data = 'spam'

    def __getattr__(self, name):
        print('getattr: ' + name)
        return getattr(self.data,  name)
